﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Runtime.Serialization;

namespace PRET.ReportDataDefine.UIData
{
    [DataContract]
    // 当用户要查看任何有关批号的报表时，首先返回OrderCheckInfo类型的list
    public class OrderCheckInfo
    {
        // 生产线编号
        [DataMember]
        public string ProductionLine { get; set; }
        // 订单号: 显示在界面上的ERP订单号
        [DataMember]
        public string OrderID { get; set; }
        // 记录在DB里面的订单号
        [DataMember]
        public string OrderString { get; set; }
        // 系统记录时间段
        [DataMember]
        public List<OrderCheckDetail> SystemRecord { get; set; }
        // ERP记录时间段
        [DataMember]
        public List<OrderCheckDetail> ERPRecord { get; set; }        
        // 如果用户选择了系统记录那么返回1， 如果用户选择了ERP记录那么返回2
        // 如果SelectSign为0时，说明用户还没有做任何选择
        [DataMember]
        public int SelectSign { get; set; }
        [DataMember]
        public int IsIgnore { get; set; }
    }

    [DataContract]
    // OrderCheckDetail包含了生产线和生产时间数据
    public class OrderCheckDetail
    {
        // 生产线名称
        [DataMember]
        public string ProductionLine { get; set; }
        // WinCC里面记录的开始时间
        [DataMember]
        public DateTime? StartTime { get; set; }
        // WinCC里面记录的结束时间
        [DataMember]
        public DateTime? EndTime { get; set; }
        [DataMember]
        public DateTime? UpdateTime { get; set; }
    }

    [DataContract]
    public class ProductionReport
    {
        [DataMember]
        public ProductionReportSummary Summary { get; set; }

        [DataMember]
        public List<ProductionReportDetailInfo> DataList { get; set; }
    }

    [DataContract]
    public class TeamWorkTime
    {
        // 班组
        [DataMember]
        public string TeamName { get; set; }
        // 混料员
        [DataMember]
        public string MixingerName { get; set; }
        // 挤出员
        [DataMember]
        public string ExtruderName { get; set; }
        // 包装员
        [DataMember]
        public string PackerName { get; set; }
        // 质量员
        [DataMember]
        public string QualityName { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
    }

    [DataContract]
    // 生产报表信息
    public class ProductionReportSummary
    {
        // 生产线
        [DataMember]
        public string ProductionLine { get; set; }
        // 订单号
        [DataMember]
        public string OrderID { get; set; }
        // 品名 品级 颜色
        [DataMember]
        public string ProductName { get; set; }
        // 批号
        [DataMember]
        public string BatchID { get; set; }
        // 目标产量
        [DataMember]
        public double Count { get; set; }
        // 已产产量
        [DataMember]
        public double CurrCount { get; set; }
        // 开始时间
        [DataMember]
        public DateTime? StartTime { get; set; }
        // 预计结束时间
        [DataMember]
        public DateTime? EstimateEndTime { get; set; }
        // 实际结束时间
        [DataMember]
        public DateTime? EndTime { get; set; }
        [DataMember]
        public DateTime? UpdateTime { get; set; }
        [DataMember]
        public double PowerConsum { get; set; }
        // 比能耗
        [DataMember]
        public double RateConsumption { get; set; }
        [DataMember]
        // 生产效率
        public double Efficiency { get; set; }
        #region 1#称相关信息
        // 1#称物料名称
        //[DataMember]
        //public string Bal1MaterialName { get; set; }
        //// 1#称物料批号
        //[DataMember]
        //public string Bal1BatchID { get; set; }
        // 1#称设定比例
        [DataMember]
        public double Bal1Scale { get; set; }
        // 1#称累计（目标）下料量
        [DataMember]
        public double Bal1TargetCount { get; set; }
        #endregion
        #region 2#称相关信息
        // 2#称物料名称
        //[DataMember]
        //public string Bal2MaterialName { get; set; }
        //// 2#称物料批号
        //[DataMember]
        //public string Bal2BatchID { get; set; }
        // 2#称设定比例
        [DataMember]
        public double Bal2Scale { get; set; }
        // 2#称累计（目标）下料量
        [DataMember]
        public double Bal2TargetCount { get; set; }
        #endregion
        #region 3#称相关信息
        // 3#称物料名称
        //[DataMember]
        //public string Bal3MaterialName { get; set; }
        //// 3#称物料批号
        //[DataMember]
        //public string Bal3BatchID { get; set; }
        // 3#称设定比例
        [DataMember]
        public double Bal3Scale { get; set; }
        // 3#称累计（目标）下料量
        [DataMember]
        public double Bal3TargetCount { get; set; }
        #endregion

        // 产品熔值上限
        [DataMember]
        public double MaxRongZhi { get; set; }
        // 产品熔值下限
        [DataMember]
        public double MinRongZhi { get; set; }
        // 残余上限
        [DataMember]
        public double MaxRemnant { get; set; }
        // 残余下限
        [DataMember]
        public double MinRemnant { get; set; }

        #region 挤出机号和允差范围
        [DataMember]
        public double JCJ1TempOffset { get; set; }
        [DataMember]
        public double JCJ2TempOffset { get; set; }
        [DataMember]
        public double JCJ3TempOffset { get; set; }
        [DataMember]
        public double JCJ4TempOffset { get; set; }
        [DataMember]
        public double JCJ5TempOffset { get; set; }
        [DataMember]
        public double JCJ6TempOffset { get; set; }
        [DataMember]
        public double JCJ7TempOffset { get; set; }
        [DataMember]
        public double JCJ8TempOffset { get; set; }
        [DataMember]
        public double JCJ9TempOffset { get; set; }
        [DataMember]
        public double JCJ10TempOffset { get; set; }
        #endregion
        #region 挤出机号和设定值
        [DataMember]
        public double JCJ1SetTemp { get; set; }
        [DataMember]
        public double JCJ2SetTemp { get; set; }
        [DataMember]
        public double JCJ3SetTemp { get; set; }
        [DataMember]
        public double JCJ4SetTemp { get; set; }
        [DataMember]
        public double JCJ5SetTemp { get; set; }
        [DataMember]
        public double JCJ6SetTemp { get; set; }
        [DataMember]
        public double JCJ7SetTemp { get; set; }
        [DataMember]
        public double JCJ8SetTemp { get; set; }
        [DataMember]
        public double JCJ9SetTemp { get; set; }
        [DataMember]
        public double JCJ10SetTemp { get; set; }
        #endregion


        // 挤出机转速上限
        [DataMember]
        public double ExtruderMaxRevolvingSpeed { get; set; }
        // 挤出机转速下限
        [DataMember]
        public double ExtruderMinRevolvingSpeed { get; set; }
        // 挤出机电流上限
        [DataMember]
        public double ExtruderMaxCurrent { get; set; }
        // 挤出机电流下限
        [DataMember]
        public double ExtruderMinCurrent { get; set; }
        public string ProLineCode { get; set; }
    }

    [DataContract]
    // 生产报表信息
    public class ProductionReportSummaryForJSON
    {
        // 生产线
        [DataMember]
        public string ProductionLine { get; set; }
        // 订单号
        [DataMember]
        public string OrderID { get; set; }
        // 品名 品级 颜色
        [DataMember]
        public string ProductName { get; set; }
        // 订单开始状态
        [DataMember]
        public bool OrderFinished { get; set; }
        // 主机运行状态
        [DataMember]
        public bool ProLineStop { get; set; }
        [DataMember]
        public string TeamName { get; set; }
        [DataMember]
        public string MixingerName { get; set; }
        [DataMember]
        public string ExtruderName { get; set; }
        [DataMember]
        public string PackerName { get; set; }
        [DataMember]
        public string QualityName { get; set; }
    }

    [DataContract]
    public class ProductionReportDetailInfo
    {
        // 记录时间
        [DataMember]
        public DateTime RecordTime { get; set; }

        // 1#称累计下料量实际值
        [DataMember]
        public double Bal1RealCount { get; set; }
        // 2#称累计下料量实际值
        [DataMember]
        public double Bal2RealCount { get; set; }
        // 3#称累计下料量实际值
        [DataMember]
        public double Bal3RealCount { get; set; }

        // 体积喂料机实际转速
        [DataMember]
        public double WLJRevolvingSpeed { get; set; }
        // 产品熔值实际值
        [DataMember]
        public double RealRongZhi { get; set; }
        // 残余实际值
        [DataMember]
        public double RealRemnant { get; set; }

        #region 挤出机号和实际温度
        [DataMember]
        public double JCJ1RealTemp { get; set; }
        [DataMember]
        public double JCJ2RealTemp { get; set; }
        [DataMember]
        public double JCJ3RealTemp { get; set; }
        [DataMember]
        public double JCJ4RealTemp { get; set; }
        [DataMember]
        public double JCJ5RealTemp { get; set; }
        [DataMember]
        public double JCJ6RealTemp { get; set; }
        [DataMember]
        public double JCJ7RealTemp { get; set; }
        [DataMember]
        public double JCJ8RealTemp { get; set; }
        [DataMember]
        public double JCJ9RealTemp { get; set; }
        [DataMember]
        public double JCJ10RealTemp { get; set; }
        #endregion

        // 挤出机转速实际值
        [DataMember]
        public double ExtruderRevolvingRealSpeed { get; set; }
        // 挤出机电流实际值
        [DataMember]
        public double ExtruderRealCurrent { get; set; }

        // 比能耗
        [DataMember]
        public double RateConsumption { get; set; }
        // 生产效率
        [DataMember]
        public double Efficiency { get; set; }
        // 班组
        [DataMember]
        public string TeamName { get; set; }
        // 混料员
        [DataMember]
        public string MixingerName { get; set; }
        // 挤出员
        [DataMember]
        public string ExtruderName { get; set; }
        // 包装员
        [DataMember]
        public string PackerName { get; set; }
        // 质量员
        [DataMember]
        public string QualityName { get; set; }
    }

    [DataContract]
    // 干燥均化机监控数据
    public class JHJReport
    {
        [DataMember]
        public JHJSummary Summary { get; set; }
        [DataMember]
        public List<JHJDetailInfo> DataList { get; set; }
    }

    [DataContract]
    public class JHJSummary
    {
        // 生产线
        [DataMember]
        public string ProductionLine { get; set; }
        // 品名 品级 颜色 批号
        [DataMember]
        public string ProductName { get; set; }
        // 目标产量（公斤）
        [DataMember]
        public double TargetWeight { get; set; }
        // 已生产数量（公斤）
        [DataMember]
        public double CurrWeight { get; set; }
        // 以生产包数
        [DataMember]
        public int Number { get; set; }
        // 单包重量 （公斤）
        [DataMember]
        public double UnitWeight { get; set; }
        [DataMember]
        public string OrderID { get; set; }
        public string OrderString { get; set; }
        [DataMember]
        public DateTime? StartTime { get; set; }
        [DataMember]
        public DateTime? EndTime { get; set; }
        public DateTime? UpdateTime { get; set; }
        // 耗电量
        [DataMember]
        public double PowerConsum { get; set; }
        // 比能耗
        [DataMember]
        public double EnergyConsum { get; set; }
    }

    [DataContract]
    // 干燥均化机监控详细数据
    public class JHJDetailInfo
    {
        // Ａ桶至Ｂ桶吸料开始时间
        [DataMember]
        public DateTime? ABStartTime { get; set; }
        // Ａ桶至Ｂ桶吸料结束时间
        [DataMember]
        public DateTime? ABEndTime { get; set; }
        [DataMember]
        public double ARealTemperature { get; set; }
        // Ｂ桶加热开始时间
        [DataMember]
        public DateTime? BHeatingStartTime { get; set; }
        // Ｂ桶加热结束时间
        [DataMember]
        public DateTime? BHeatingEndTime { get; set; }
        // 包装开始时间
        [DataMember]
        public DateTime? PackingStartTime { get; set; }
        // 包装结束时间
        [DataMember]
        public DateTime? PackingEndTime { get; set; }
        // 包装数量
        [DataMember]
        public int PackingNum { get; set; }
        // 放料时锥温度
        [DataMember]
        public double Temperature { get; set; }
        // 班组
        [DataMember]
        public string TeamName { get; set; }
        // 包装员
        [DataMember]
        public string PackerName { get; set; }
    }

    [DataContract]
    // 设备运行记录表
    public class DeviceRunReport
    {
        // 设备编号
        [DataMember]
        public string DeviceNum { get; set; }
        // 设备名称
        [DataMember]
        public string DeviceName { get; set; }
        // 设备位置
        [DataMember]
        public string DevicePlace { get; set; }
        // 保养设定周期
        [DataMember]
        public string MaintenanceCycle { get; set; }
        // 启用时间
        [DataMember]
        public DateTime LaunchTime { get; set; }
        // 离下次保养时间
        [DataMember]
        public DateTime NextMaintenance { get; set; }
        // 总保养次数
        [DataMember]
        public int MaintenanceCount { get; set; }
        // 总运行时间
        [DataMember]
        public string CountTime { get; set; }
    }

    [DataContract]
    // 抄表系统报表
    public class MeterReadingReport
    {
        [DataMember]
        public MeterReadingSummary Summary { get; set; }
        [DataMember]
        public List<MeterReadingDetailInfo> DataList { get; set; }
    }

    [DataContract]
    public class MeterReadingSummary
    {
        // 开始时间
        [DataMember]
        public DateTime StartTime { get; set; }
        // 结束时间
        [DataMember]
        public DateTime EndTime { get; set; }
        // 峰值电费单价
        [DataMember]
        public float PeakUnitPrice { get; set; }
        // 平直电费单价
        [DataMember]
        public float GenUnitPrice { get; set; }
        // 谷值电费单价
        [DataMember]
        public float LowUnitPrice { get; set; }
    }

    [DataContract]
    // 抄表系统详细数据
    public class MeterReadingDetailInfo
    {
        // 电表编号
        [DataMember]
        public string AmmeterID { get; set; }
        // 电表位置
        [DataMember]
        public string AmmeterPlace { get; set; }
        // JC峰值用电量
        [DataMember]
        public double JCPeakConsumption { get; set; }
        // JH峰值用电量
        [DataMember]
        public double JHPeakConsumption { get; set; }
        // JC+JH峰值用电量
        [DataMember]
        public double PeakConsumption { get; set; }
        // JC平直用电量
        [DataMember]
        public double JCAvgConsumption { get; set; }
        // JH平直用电量
        [DataMember]
        public double JHAvgConsumption { get; set; }
        // JC+JH平直用电量
        [DataMember]
        public double AvgConsumption { get; set; }
        // JC谷值用电量
        [DataMember]
        public double JCValleyConsumption { get; set; }
        // JH谷值用电量
        [DataMember]
        public double JHValleyConsumption { get; set; }
        // JC+JH谷值用电量
        [DataMember]
        public double ValleyConsumption { get; set; }
        // JC电费
        [DataMember]
        public double JCElectricCharge { get; set; }
        // JH电费
        [DataMember]
        public double JHElectricCharge { get; set; }
        // JC+JH电费
        [DataMember]
        public double ElectricCharge { get; set; }
        // JC最大电流值
        [DataMember]
        public double JCMaxCurrent { get; set; }
        // JH最大电流值
        [DataMember]
        public double JHMaxCurrent { get; set; }
        // JC+JH最大电流值
        [DataMember]
        public double MaxCurrent { get; set; }
        // JC最小电流值
        [DataMember]
        public double JCMinCurrent { get; set; }
        // JH最小电流值
        [DataMember]
        public double JHMinCurrent { get; set; }
        // JC+JH最小电流值
        [DataMember]
        public double MinCurrent { get; set; }
        // JC最大负荷值
        [DataMember]
        public double JCMaxLoad { get; set; }
        // JH最大负荷值
        [DataMember]
        public double JHMaxLoad { get; set; }
        // JC+JH最大负荷值
        [DataMember]
        public double MaxLoad { get; set; }
    }

    public class MeterDetailInfo
    {
        public DateTime RecordTime { get; set; }
        public double ElectricPower { get; set; }
        public double MaxCurrent { get; set; }
        public double MinCurrent { get; set; }
        public double MaxPower { get; set; }
    }

    [DataContract]
    // 高低柜参数记录表
    public class HighLowStatusReport
    {
        // 日期
        [DataMember]
        public DateTime Date { get; set; }
        // 最高温度
        [DataMember]
        public double MaxTemperature { get; set; }
        // 最高湿度
        [DataMember]
        public double MaxHumidity { get; set; }
        // 最大电流
        [DataMember]
        public double MaxCurrent { get; set; }
        // 最小电流
        [DataMember]
        public double MinCurrent { get; set; }
        // 最大电压
        [DataMember]
        public double MaxVoltage { get; set; }
        // 最小电压
        [DataMember]
        public double MinVoltage { get; set; }
        // 最大负荷
        [DataMember]
        public double MaxLoad { get; set; }
        // 最小负荷
        [DataMember]
        public double MinLoad { get; set; }
        // 功率因素
        [DataMember]
        public double PowerFactor { get; set; }
    }

    [DataContract]
    // 高低柜电压记录表
    public class HighLowVoltageReport
    {
        // 开始时间
        [DataMember]
        public DateTime StartTime { get; set; }
        // 结束时间
        [DataMember]
        public DateTime EndTime { get; set; }
        [DataMember]
        public double D1MeterDegree { get; set; }
        [DataMember]
        public double D2MeterDegree { get; set; }
        [DataMember]
        public double D3MeterDegree { get; set; }
        [DataMember]
        public double D1D2_1 { get; set; }
        [DataMember]
        public double D1D2_2 { get; set; }
        [DataMember]
        public double D1D3 { get; set; }
        [DataMember]
        public double D1D4 { get; set; }
        [DataMember]
        public double D1D5_1 { get; set; }
        [DataMember]
        public double D1D5_2 { get; set; }
        [DataMember]
        public double D1D6_1 { get; set; }
        [DataMember]
        public double D1D6_2 { get; set; }

        [DataMember]
        public double D2D2 { get; set; }
        [DataMember]
        public double D2D3 { get; set; }
        [DataMember]
        public double D2D4_1 { get; set; }
        [DataMember]
        public double D2D4_2 { get; set; }
        [DataMember]
        public double D2D5_1 { get; set; }
        [DataMember]
        public double D2D5_2 { get; set; }
        [DataMember]
        public double D2D6 { get; set; }

        [DataMember]
        public double D3D2 { get; set; }
        [DataMember]
        public double D3D3 { get; set; }
        [DataMember]
        public double D3D4 { get; set; }
        [DataMember]
        public double D3D5 { get; set; }
        [DataMember]
        public double D3D6_1 { get; set; }
        [DataMember]
        public double D3D6_2 { get; set; }
        [DataMember]
        public double D3D7_1 { get; set; }
        [DataMember]
        public double D3D7_2 { get; set; }
        [DataMember]
        public double D3D7_3 { get; set; }
        [DataMember]
        public double D3D8_1 { get; set; }
        [DataMember]
        public double D3D8_2 { get; set; }
        [DataMember]
        public double D3D8_3 { get; set; }
        [DataMember]
        public double D3D8_4 { get; set; }
        [DataMember]
        public double D3D8_5 { get; set; }
        [DataMember]
        public double D3D8_6 { get; set; }
        [DataMember]
        public double D3D8_7 { get; set; }
        [DataMember]
        public double D3D8_8 { get; set; }
        [DataMember]
        public double D3D9_1 { get; set; }
        [DataMember]
        public double D3D9_2 { get; set; }
        [DataMember]
        public double D3D9_3 { get; set; }
        [DataMember]
        public double D3D9_4 { get; set; }
        [DataMember]
        public double D3D9_5 { get; set; }
        [DataMember]
        public double D3D9_6 { get; set; }
        [DataMember]
        public double D3D9_7 { get; set; }
        [DataMember]
        public double D3D9_8 { get; set; }
        [DataMember]
        public double D3D9_9 { get; set; }
        [DataMember]
        public double D3D10_1 { get; set; }
        [DataMember]
        public double D3D10_2 { get; set; }
        [DataMember]
        public double D3D10_3 { get; set; }
        [DataMember]
        public double D3D10_4 { get; set; }
        [DataMember]
        public double D3D10_5 { get; set; }
        [DataMember]
        public double D3D10_6 { get; set; }
        [DataMember]
        public double D3D10_7 { get; set; }
        [DataMember]
        public double D3D10_8 { get; set; }
        [DataMember]
        public double D3D10_9 { get; set; }
        [DataMember]
        public double D3D11_1 { get; set; }
        [DataMember]
        public double D3D11_2 { get; set; }
        [DataMember]
        public double D3D11_3 { get; set; }
        [DataMember]
        public double D3D11_4 { get; set; }
        [DataMember]
        public double D3D11_5 { get; set; }
        [DataMember]
        public double D3D11_6 { get; set; }
        [DataMember]
        public double D3D12_1 { get; set; }
        [DataMember]
        public double D3D12_2 { get; set; }
        [DataMember]
        public double D3D12_3 { get; set; }
        [DataMember]
        public double D3D12_4 { get; set; }
    }

    [DataContract]
    // 生产任务信息
    public class ProductiveTaskReport
    {
        // 生产线
        [DataMember]
        public string ProductLine { get; set; }
        /// <summary>
        /// 在产信息
        /// </summary>
        // 品名 品级 颜色 批号
        [DataMember]
        public string CurrentProductName { get; set; }
        // 数量
        [DataMember]
        public double CurrentWeight { get; set; }
        // 预计结束时间
        [DataMember]
        public DateTime? CurrentEstimateEndTime { get; set; }
        [DataMember]
        public string CurrentOrderID { get; set; }

        /// <summary>
        /// 待产信息
        /// </summary>
        // 品名 品级 颜色 批号
        [DataMember]
        public string NextProductName { get; set; }
        // 数量
        [DataMember]
        public double NextWeight { get; set; }
        // 预计开始时间
        [DataMember]
        public DateTime? NextEstimateStartTime { get; set; }
        // 预计结束时间
        [DataMember]
        public DateTime? NextEstimateEndTime { get; set; }
        [DataMember]
        public string NextOrderID { get; set; }
    }

    [DataContract]
    // 生产任务信息
    public class ProductiveTaskReportTV
    {
        // 生产线
        [DataMember]
        public string ProductLine { get; set; }
        /// <summary>
        /// 在产信息
        /// </summary>
        // 品名 品级 颜色 批号
        [DataMember]
        public string CurrentProductName { get; set; }
        // 数量
        [DataMember]
        public double CurrentWeight { get; set; }
        // 开始时间
        [DataMember]
        public DateTime? StartTime { get; set; }
        // 预计结束时间
        [DataMember]
        public DateTime? CurrentEstimateEndTime { get; set; }
        [DataMember]
        public string CurrentOrderID { get; set; }
        [DataMember]
        public string TeamName { get; set; }
        [DataMember]
        public string MixingerName { get; set; }
        [DataMember]
        public string ExtruderName { get; set; }
        [DataMember]
        public string PackerName { get; set; }
        [DataMember]
        public string QualityName { get; set; }
        [DataMember]
        public double ProductionEfficiency { get; set; }
        // 已生产重量
        [DataMember]
        public double Weight { get; set; }
        // 总用电量
        [DataMember]
        public double TotalPower { get; set; }
        // 总比能耗
        [DataMember]
        public double TotalEnergy { get; set; }
    }

    [DataContract]
    // 班组生产效率数据
    public class TeamEfficiencyReport
    {
        // 班组
        [DataMember]
        public string TeamName { get; set; }
        // 一月份生产效率
        [DataMember]
        public double JanEfficiency { get; set; }
        // 一月份生产时间
        [DataMember]
        public double JanHours { get; set; }
        // 一月份生产产量
        [DataMember]
        public double JanWeight { get; set; }
        // 二月份生产效率
        [DataMember]
        public double FebEfficiency { get; set; }
        // 二月份生产时间
        [DataMember]
        public double FebHours { get; set; }
        // 二月份生产产量
        [DataMember]
        public double FebWeight { get; set; }
        // 三月份生产效率
        [DataMember]
        public double MarEfficiency { get; set; }
        // 三月份生产时间
        [DataMember]
        public double MarHours { get; set; }
        // 三月份生产产量
        [DataMember]
        public double MarWeight { get; set; }
        // 四月份生产效率
        [DataMember]
        public double AprEfficiency { get; set; }
        // 四月份生产时间
        [DataMember]
        public double AprHours { get; set; }
        // 四月份生产产量
        [DataMember]
        public double AprWeight { get; set; }
        // 五月份生产效率
        [DataMember]
        public double MayEfficiency { get; set; }
        // 五月份生产时间
        [DataMember]
        public double MayHours { get; set; }
        // 五月份生产产量
        [DataMember]
        public double MayWeight { get; set; }
        // 六月份生产效率
        [DataMember]
        public double JunEfficiency { get; set; }
        // 六月份生产时间
        [DataMember]
        public double JunHours { get; set; }
        // 六月份生产产量
        [DataMember]
        public double JunWeight { get; set; }
        // 七月份生产效率
        [DataMember]
        public double JulEfficiency { get; set; }
        // 七月份生产时间
        [DataMember]
        public double JulHours { get; set; }
        // 七月份生产产量
        [DataMember]
        public double JulWeight { get; set; }
        // 八月份生产效率
        [DataMember]
        public double AugEfficiency { get; set; }
        // 八月份生产时间
        [DataMember]
        public double AugHours { get; set; }
        // 八月份生产产量
        [DataMember]
        public double AugWeight { get; set; }
        // 九月份生产效率
        [DataMember]
        public double SepEfficiency { get; set; }
        // 九月份生产时间
        [DataMember]
        public double SepHours { get; set; }
        // 九月份生产产量
        [DataMember]
        public double SepWeight { get; set; }
        // 十月份生产效率
        [DataMember]
        public double OctEfficiency { get; set; }
        // 十月份生产时间
        [DataMember]
        public double OctHours { get; set; }
        // 十月份生产产量
        [DataMember]
        public double OctWeight { get; set; }
        // 十一月份生产效率
        [DataMember]
        public double NovEfficiency { get; set; }
        // 十一月份生产时间
        [DataMember]
        public double NovHours { get; set; }
        // 十一月份生产产量
        [DataMember]
        public double NovWeight { get; set; }
        // 十二月份生产效率
        [DataMember]
        public double DecEfficiency { get; set; }
        // 十二月份生产时间
        [DataMember]
        public double DecHours { get; set; }
        // 十二月份生产产量
        [DataMember]
        public double DecWeight { get; set; }
        // 全年平均生产效率
        [DataMember]
        public double AvgEfficiency { get; set; }
        // 最大生产效率
        [DataMember]
        public double MaxEfficiency { get; set; }
        // 最小生产效率
        [DataMember]
        public double MinEfficiency { get; set; }
        // 效率指标
        [DataMember]
        public double EfficiencyQuota { get; set; }
        // 全年生产数量
        [DataMember]
        public double Weight { get; set; }
        // 全年生产时间
        [DataMember]
        public double Hours { get; set; }
    }

    [DataContract]
    // 生产线效率数据
    public class ProductionLineEfficiencyReport
    {
        // 班组
        [DataMember]
        public string ProductionLine { get; set; }
        // 一月份生产效率
        [DataMember]
        public double JanEfficiency { get; set; }
        // 一月份生产时间
        [DataMember]
        public double JanHours { get; set; }
        // 一月份生产产量
        [DataMember]
        public double JanWeight { get; set; }
        // 二月份生产效率
        [DataMember]
        public double FebEfficiency { get; set; }
        // 二月份生产时间
        [DataMember]
        public double FebHours { get; set; }
        // 二月份生产产量
        [DataMember]
        public double FebWeight { get; set; }
        // 三月份生产效率
        [DataMember]
        public double MarEfficiency { get; set; }
        // 三月份生产时间
        [DataMember]
        public double MarHours { get; set; }
        // 三月份生产产量
        [DataMember]
        public double MarWeight { get; set; }
        // 四月份生产效率
        [DataMember]
        public double AprEfficiency { get; set; }
        // 四月份生产时间
        [DataMember]
        public double AprHours { get; set; }
        // 四月份生产产量
        [DataMember]
        public double AprWeight { get; set; }
        // 五月份生产效率
        [DataMember]
        public double MayEfficiency { get; set; }
        // 五月份生产时间
        [DataMember]
        public double MayHours { get; set; }
        // 五月份生产产量
        [DataMember]
        public double MayWeight { get; set; }
        // 六月份生产效率
        [DataMember]
        public double JunEfficiency { get; set; }
        // 六月份生产时间
        [DataMember]
        public double JunHours { get; set; }
        // 六月份生产产量
        [DataMember]
        public double JunWeight { get; set; }
        // 七月份生产效率
        [DataMember]
        public double JulEfficiency { get; set; }
        // 七月份生产时间
        [DataMember]
        public double JulHours { get; set; }
        // 七月份生产产量
        [DataMember]
        public double JulWeight { get; set; }
        // 八月份生产效率
        [DataMember]
        public double AugEfficiency { get; set; }
        // 八月份生产时间
        [DataMember]
        public double AugHours { get; set; }
        // 八月份生产产量
        [DataMember]
        public double AugWeight { get; set; }
        // 九月份生产效率
        [DataMember]
        public double SepEfficiency { get; set; }
        // 九月份生产时间
        [DataMember]
        public double SepHours { get; set; }
        // 九月份生产产量
        [DataMember]
        public double SepWeight { get; set; }
        // 十月份生产效率
        [DataMember]
        public double OctEfficiency { get; set; }
        // 十月份生产时间
        [DataMember]
        public double OctHours { get; set; }
        // 十月份生产产量
        [DataMember]
        public double OctWeight { get; set; }
        // 十一月份生产效率
        [DataMember]
        public double NovEfficiency { get; set; }
        // 十一月份生产时间
        [DataMember]
        public double NovHours { get; set; }
        // 十一月份生产产量
        [DataMember]
        public double NovWeight { get; set; }
        // 十二月份生产效率
        [DataMember]
        public double DecEfficiency { get; set; }
        // 十二月份生产时间
        [DataMember]
        public double DecHours { get; set; }
        // 十二月份生产产量
        [DataMember]
        public double DecWeight { get; set; }
        // 全年平均生产效率
        [DataMember]
        public double AvgEfficiency { get; set; }
        // 最大生产效率
        [DataMember]
        public double MaxEfficiency { get; set; }
        // 最小生产效率
        [DataMember]
        public double MinEfficiency { get; set; }
        // 效率指标
        [DataMember]
        public double EfficiencyQuota { get; set; }
        // 全年生产数量
        [DataMember]
        public double Weight { get; set; }
        // 全年生产时间
        [DataMember]
        public double Hours { get; set; }
        // 在产效率
        [DataMember]
        public double CurrEfficiency { get; set; }
    }

    [DataContract]
    // 显示相关的配置选项
    public class ShowConfig
    {
        [DataMember]
        // 控制每个界面切换的时间，单位为秒
        public int APP_WORD { get; set; }
        [DataMember]
        // 控制界面是否自动切换，状态为1时自动切换。状态为0时手动切换。
        public int APP_CTRL1 { get; set; }
        [DataMember]
        // 在手动模式状态，是否前进 1 前进
        public int APP_CTRL2 { get; set; }
        [DataMember]
        // 在手动模式状态，是否后退 1 后退
        public int APP_CTRL3 { get; set; }

    }

    public class OrderRecordTime
    {
        public string ProductionLine { get; set; }
        public string OrderID { get; set; }
        public string OrderString { get; set; }
        public List<OrderCheckDetail> RecordList { get; set; }
    }

    public class OrderTimeSelectSign
    {
        public string OrderID { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; } 
    }

    // ERP提供的员工信息
    public class ERPPersonInfo
    {
        public string ID { get; set; }
        public string Name { get; set; }
        public string TeamName { get; set; }
    }

    public class ERPProductionInfo
    {
        public string ProductionLine { get; set; }
        // 订单号
        public string OrderID { get; set; }
        // 品名
        public string ProductName { get; set; }
        // 批号
        public string BatchID { get; set; }
        // 存货编码
        public string StockID { get; set; }
        // 数量
        public double Count { get; set; }
        // 当前已产数量
        public double CurrCount { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
    }

    public class ProductionSummary
    {
        // 生产线
        public string ProductionLine { get; set; }
        // 品名 品级 颜色
        public string ProductName { get; set; }
        // 批号
        public string BatchID { get; set; }
        // 数量
        public int Count { get; set; }
    }

    public class ABRecordTime
    {
        // A桶至B桶的吸料开始时间
        public DateTime StartTime { get; set; }
        // A桶至B桶吸料结束时间
        public DateTime? EndTime { get; set; }
        public double RealTemperature { get; set; }
    }
    public class BHeatingRecordTime
    {
        // B桶加热开始时间
        public DateTime StartTime { get; set; }
        // B桶加热结束时间
        public DateTime? EndTime { get; set; }
    }
    public class BPackingRecordTime
    {
        // 放料时锥温度
        public double Temperature { get; set; }
        // B桶放料开始时间
        public DateTime StartTime { get; set; }
        // B桶放料结束时间
        public DateTime? EndTime { get; set; }
        // 包装数量
        public int Number { get; set; }
        // 单包重量
        public double Weight { get; set; }
    }

    public partial class OrderTask
    {
        public string OrderID { get; set; }
        public string ProductionName { get; set; }
        public double Weight { get; set; }
        public DateTime? EstimateStartTime { get; set; }
        public DateTime? EstimateEndTime { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime UpdateTime { get; set; }
    }

    public class TeamEfficiency
    {
        public string TeamID { get; set; }
        public List<TeamProductionLineTime> OutPutList { get; set; }
    }

    public class ProductionEfficiency
    {
        public string ProductionLine { get; set; }
        // 按照12个月份列出每个月的订单列表
        public Dictionary<int, List<OrderProductionLineTime>> OutPutDic { get; set; }
    }
    public class OrderEfficiency
    {
        public string OrderID { get; set; }
        public double Mins { get; set; }
        public DateTime EndTime { get; set; }
        public double Weight { get; set; }
    }
    public class OrderProductionLineTime
    {
        public string OrderID { get; set; }
        public string ProductionLine { get; set; }
        public DateTime StartTime { get; set; } // 此订单在生产线上的开始时间
        public DateTime EndTime { get; set; } // 此订单在生产线上的结束时间
        public double Weight { get; set; }  // 此订单在生产线上指定时间段的产量
    }
    public class TeamProductionLineTime
    {
        public string TeamID { get; set; }
        public string ProductionLine { get; set; }
        public DateTime StartTime { get; set; } // 班组在这个生产线上的工作开始时间
        public DateTime EndTime { get; set; } // 班组在这个生产线上的工作结束时间
        public double Weight { get; set; }  // 班组在这个生产线上指定时间段的产量
    }

    public partial class JCJData
    {
        public string ProductionLine { get; set; }
        public string OrderID { get; set; }
        public DateTime? StartTime { get; set; }
        public DateTime? EndTime { get; set; }
        public float Bal1Scale { get; set; }
        public float Bal2Scale { get; set; }
        public float Bal3Scale { get; set; }
        public float JCJ1TempOffset { get; set; }
        public float JCJ2TempOffset { get; set; }
        public float JCJ3TempOffset { get; set; }
        public float JCJ4TempOffset { get; set; }
        public float JCJ5TempOffset { get; set; }
        public float JCJ6TempOffset { get; set; }
        public float JCJ7TempOffset { get; set; }
        public float JCJ8TempOffset { get; set; }
        public float JCJ9TempOffset { get; set; }
        public float JCJ10TempOffset { get; set; }
        public float JCJ1SetTemp { get; set; }
        public float JCJ2SetTemp { get; set; }
        public float JCJ3SetTemp { get; set; }
        public float JCJ4SetTemp { get; set; }
        public float JCJ5SetTemp { get; set; }
        public float JCJ6SetTemp { get; set; }
        public float JCJ7SetTemp { get; set; }
        public float JCJ8SetTemp { get; set; }
        public float JCJ9SetTemp { get; set; }
        public float JCJ10SetTemp { get; set; }
        public int ExtruderMaxRevolvingSpeed { get; set; }
        public int ExtruderMinRevolvingSpeed { get; set; }
        public float ExtruderMaxCurrent { get; set; }
        public float ExtruderMinCurrent { get; set; }
        public float MaxRongZhi { get; set; }
        public float MinRongZhi { get; set; }
        public float MaxRemnant { get; set; }
        public float MinRemnant { get; set; }
        public string ProLineCode { get; set; }
        public float StartPower { get; set; }
        public float EndPower { get; set; }
    }

    public partial class JHJData
    {
        public string ProductionLine { get; set; }
        public string OrderID { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        public int Number { get; set; }
        public double UnitWeight { get; set; }
        public string ProLineCode { get; set; }
        public double StartPower { get; set; }
        public double EndPower { get; set; }
    }

    [DataContract]
    public class EmployeAttendance
    {
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string EmployeID { get; set; }
        [DataMember]
        public string TeamName { get; set; }
        [DataMember]
        public int Year { get; set; }
        [DataMember]
        public int Month { get; set; }
        [DataMember]
        public double workday1 { get; set; }
        [DataMember]
        public double workday2 { get; set; }
        [DataMember]
        public double workday3 { get; set; }
        [DataMember]
        public double workday4 { get; set; }
        [DataMember]
        public double workday5 { get; set; }
        [DataMember]
        public double workday6 { get; set; }
        [DataMember]
        public double workday7 { get; set; }
        [DataMember]
        public double workday8 { get; set; }
        [DataMember]
        public double workday9 { get; set; }
        [DataMember]
        public double workday10 { get; set; }
        [DataMember]
        public double workday11 { get; set; }
        [DataMember]
        public double workday12 { get; set; }
        [DataMember]
        public double workday13 { get; set; }
        [DataMember]
        public double workday14 { get; set; }
        [DataMember]
        public double workday15 { get; set; }
        [DataMember]
        public double workday16 { get; set; }
        [DataMember]
        public double workday17 { get; set; }
        [DataMember]
        public double workday18 { get; set; }
        [DataMember]
        public double workday19 { get; set; }
        [DataMember]
        public double workday20 { get; set; }
        [DataMember]
        public double workday21 { get; set; }
        [DataMember]
        public double workday22 { get; set; }
        [DataMember]
        public double workday23 { get; set; }
        [DataMember]
        public double workday24 { get; set; }
        [DataMember]
        public double workday25 { get; set; }
        [DataMember]
        public double workday26 { get; set; }
        [DataMember]
        public double workday27 { get; set; }
        [DataMember]
        public double workday28 { get; set; }
        [DataMember]
        public double workday29 { get; set; }
        [DataMember]
        public double workday30 { get; set; }
        [DataMember]
        public double workday31 { get; set; }

        public static EmployeAttendance CloneSub11(EmployeAttendance source)
        {
            EmployeAttendance obj = new EmployeAttendance();
            obj.EmployeID = source.EmployeID;
            obj.Month = source.Month;
            obj.Name = source.Name;
            obj.TeamName = source.TeamName;
            obj.workday1 = source.workday1 > 11 ? 11 : source.workday1;
            obj.workday2 = source.workday2 > 11 ? 11 : source.workday2;
            obj.workday3 = source.workday3 > 11 ? 11 : source.workday3;
            obj.workday4 = source.workday4 > 11 ? 11 : source.workday4;
            obj.workday5 = source.workday5 > 11 ? 11 : source.workday5;
            obj.workday6 = source.workday6 > 11 ? 11 : source.workday6;
            obj.workday7 = source.workday7 > 11 ? 11 : source.workday7;
            obj.workday8 = source.workday8 > 11 ? 11 : source.workday8;
            obj.workday9 = source.workday9 > 11 ? 11 : source.workday9;
            obj.workday10 = source.workday10 > 11 ? 11 : source.workday10;
            obj.workday11 = source.workday11 > 11 ? 11 : source.workday11;
            obj.workday12 = source.workday12 > 11 ? 11 : source.workday12;
            obj.workday13 = source.workday13 > 11 ? 11 : source.workday13;
            obj.workday14 = source.workday14 > 11 ? 11 : source.workday14;
            obj.workday15 = source.workday15 > 11 ? 11 : source.workday15;
            obj.workday16 = source.workday16 > 11 ? 11 : source.workday16;
            obj.workday17 = source.workday17 > 11 ? 11 : source.workday17;
            obj.workday18 = source.workday18 > 11 ? 11 : source.workday18;
            obj.workday19 = source.workday19 > 11 ? 11 : source.workday19;
            obj.workday20 = source.workday20 > 11 ? 11 : source.workday20;
            obj.workday21 = source.workday21 > 11 ? 11 : source.workday21;
            obj.workday22 = source.workday22 > 11 ? 11 : source.workday22;
            obj.workday23 = source.workday23 > 11 ? 11 : source.workday23;
            obj.workday24 = source.workday24 > 11 ? 11 : source.workday24;
            obj.workday25 = source.workday25 > 11 ? 11 : source.workday25;
            obj.workday26 = source.workday26 > 11 ? 11 : source.workday26;
            obj.workday27 = source.workday27 > 11 ? 11 : source.workday27;
            obj.workday28 = source.workday28 > 11 ? 11 : source.workday28;
            obj.workday29 = source.workday29 > 11 ? 11 : source.workday29;
            obj.workday30 = source.workday30 > 11 ? 11 : source.workday30;
            obj.workday31 = source.workday31 > 11 ? 11 : source.workday31;
            obj.Year = source.Year;
            return obj;
        }
    }

    [DataContract]
    public class TeamAttendanceMain
    {
        [DataMember]
        public List<TeamAttendance> TeamList { get; set; }

        [DataMember]
        public TeamAttendanceRestHours TeamHour { get; set; }
    }

    [DataContract]
    public class TeamAttendance
    {
        [DataMember]
        public int Year { get; set; }
        [DataMember]
        public int Month { get; set; }
        [DataMember]
        public int Day { get; set; }
        [DataMember]
        public double ATeamHours { get; set; }
        [DataMember]
        public double BTeamHours { get; set; }
        [DataMember]
        public double CTeamHours { get; set; }
        [DataMember]
        public double DTeamHours { get; set; }
        [DataMember]
        public double ETeamHours { get; set; }
        [DataMember]
        public double FTeamHours { get; set; }
        [DataMember]
        public double JXTeamHours { get; set; }
        [DataMember]
        public double ColorTeamHours { get; set; }
        [DataMember]
        public double FZTeamHours { get; set; }
    }

    [DataContract]
    public class TeamAttendanceRestHours
    {
        [DataMember]
        public DateTime Month { get; set; }
        [DataMember]
        public double ATeamHours { get; set; }
        [DataMember]
        public double BTeamHours { get; set; }
        [DataMember]
        public double CTeamHours { get; set; }
        [DataMember]
        public double DTeamHours { get; set; }
        [DataMember]
        public double ETeamHours { get; set; }
        [DataMember]
        public double FTeamHours { get; set; }
        [DataMember]
        public double JXTeamHours { get; set; }
        [DataMember]
        public double ColorTeamHours { get; set; }
        [DataMember]
        public double FZTeamHours { get; set; }
        [DataMember]
        public DateTime UpdateTime { get; set; }

        public static TeamAttendanceRestHours operator -(TeamAttendanceRestHours a, TeamAttendanceRestHours b)
        {
            TeamAttendanceRestHours ret = new TeamAttendanceRestHours();
            ret.Month = b.Month;
            ret.ATeamHours = a.ATeamHours - b.ATeamHours > 0 ? a.ATeamHours - b.ATeamHours : 0;
            ret.BTeamHours = a.BTeamHours - b.BTeamHours > 0 ? a.BTeamHours - b.BTeamHours : 0;
            ret.CTeamHours = a.CTeamHours - b.CTeamHours > 0 ? a.CTeamHours - b.CTeamHours : 0;
            ret.DTeamHours = a.DTeamHours - b.DTeamHours > 0 ? a.DTeamHours - b.DTeamHours : 0;
            ret.ETeamHours = a.ETeamHours - b.ETeamHours > 0 ? a.ETeamHours - b.ETeamHours : 0;
            ret.FTeamHours = a.FTeamHours - b.FTeamHours > 0 ? a.FTeamHours - b.FTeamHours : 0;
            ret.JXTeamHours = a.JXTeamHours;
            ret.ColorTeamHours = a.ColorTeamHours;
            ret.FZTeamHours = a.FZTeamHours;
            return ret;
        }
    }

    // 班组在挤出机上的工作时间
    public class ProductionTeamWorkTime
    {
        public string ProductionLine { get; set; }
        public string ProLineCode { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        public string TeamID { get; set; }
    }

    // 滑石母粒机
    [DataContract]
    public class HSMLJData
    {
        [DataMember]
        public DateTime StartTime { get; set; }
        [DataMember]
        public DateTime EndTime { get; set; }
        [DataMember]
        public double MainA { get; set; }
        [DataMember]
        public double MainB { get; set; }
        [DataMember]
        public double ExtraA { get; set; }
        [DataMember]
        public double ExtraB { get; set; }
        [DataMember]
        public double WorkHours { get; set; }
        [DataMember]
        public double PowerCount { get; set; }
        [DataMember]
        public double RateConsumption { get; set; }
    }

    [DataContract]
    public class ProductionLineStandby
    {
        [DataMember]
        public string ProductionLine { get; set; }
        [DataMember]
        public double JanTime { get; set; }
        [DataMember]
        public double FebTime { get; set; }
        [DataMember]
        public double MarTime { get; set; }
        [DataMember]
        public double AprTime { get; set; }
        [DataMember]
        public double MayTime { get; set; }
        [DataMember]
        public double JunTime { get; set; }
        [DataMember]
        public double JulTime { get; set; }
        [DataMember]
        public double AugTime { get; set; }
        [DataMember]
        public double SepTime { get; set; }
        [DataMember]
        public double OctTime { get; set; }
        [DataMember]
        public double NovTime { get; set; }
        [DataMember]
        public double DecTime { get; set; }
        [DataMember]
        public double MaxTime { get; set; }
        [DataMember]
        public double MinTime { get; set; }
    }

    [DataContract]
    public class TVControlInfo
    {
        [DataMember]
        public string Message { get; set; }
        [DataMember]
        public int Time { get; set; }
        [DataMember]
        public int FontSize { get; set; }
    }
}
